About BBEdit Lite ===== ====== ==== BBEdit Lite 4.1 is a freeware derivative of BBEdit 4.5, the popular and critically acclaimed text and HTML editor for Web authors, programmers, on-line-service users, and anyone else who needs to edit plain-text files. BBEdit Lite is shipped with this QuickStart document which describes many of the application's features. Please note that this file is the only documentation available for BBEdit Lite. Full documentation, as well as a considerable amount of additional functionality, is available with the purchase of BBEdit 4.5. See the document "How do I order BBEdit 4.5" for details on obtaining your own copy of BBEdit. We are committed to providing continued support for BBEdit Lite by responding to individual questions and inquiries, as well as in providing fixes for Lite, and improvements in its functionality. We will announce any future changes or updates to Lite via the comp.sys.mac.* newsgroups, as well as by providing information and downloadable versions on our Web and ftp sites. We regret that we cannot offer telephone or fax support for BBEdit Lite; if you have any suggestions, comments, or questions regarding Lite, please send us email at . Overview ======== BBEdit Lite Capabilities ------ ---- ------------ BBEdit Lite offers a great deal of useful functionality: * Powerful multi-file search. BBEdit Lite offers the usual multi-file search, in which a disk directory is scanned and the files are opened one at a time; however, BBEdit Lite can also display the search results in a window for easy browsing (and selected entries in the window can be opened for display). The search can also be limited to files that are already opened for editing, or to files which were already found in a previous multi-file search. BBEdit Lite also offers multi-file replace capability for automated "search and destroy" operations. * File size limited only by available memory. BBEdit Lite's default partition size is 1221K (only 650K with VM or RAMDoubler) of RAM. This can be set as low as 450K, to make BBEdit Lite the ideal constantly-resident editor for small to moderate tasks, or turned up as high as necessary to edit many large files or perform large-scale search-and-replace operations. BBEdit Lite automatically takes advantage of available system memory, so that you don't have to adjust its partition size to edit large files. * No hard limit on number of files open. The number of files that BBEdit Lite can have open at once is limited by available memory, and can be increased or decreased by adjusting BBEdit Lite's partition size as appropriate. * Easy manipulation of multiple files at once. The "Open Several..." command makes it possible to open multiple files from different folders at once, and the Save and Print commands can operate on all open files at once. * Pattern ("grep") searching. Matching patterns can be constructed so that strings other than exact literal matches can be found and replaced; for example, converting Pascal comments to C comments, or modifying instances of HTML tags. * Drag & Drop Editing. BBEdit Lite now includes support for Macintosh Drag & Drop, both for internal editing operations, and for exchanging data with other applications, or creating text clippings in the Finder. * High performance. BBEdit Lite 4.1 includes PowerMac native code support. Try and enjoy. BBEdit Lite also offers the following significant benefits: * High quality. BBEdit Lite is based on mature and stable technology; this technology is the beneficiary of years of in-house and field use and testing. The commitment to quality and functionality shown in BBEdit 4.5 is reflected in BBEdit Lite. * Zero cost. BBEdit Lite is free, with no qualification. It is not a shareware or commercial product. It is not a demo version, and there is no expectation that you will buy anything. * Extensibility. BBEdit Lite can use plug-in code modules to perform a wide range of text editing and transformation tasks. There are a large number of these plug-ins already available from us, and from other sources such as the Info-Mac archives. This document contains specific information on how to take advantage of BBEdit Lite's capabilities. If you would like to write such plug-ins, we offer a BBEdit extension developer's kit, which includes documentation on how to write your own plug-ins, as well as source code for several sample plug-ins. A copy of the BBEdit Extension SDK is available from our Web site: or from our FTP site: as well as from Info-Mac mirror sites, in the /info-mac/text/bb directory. Differences between BBEdit Lite and BBEdit 4.5 ----------- ------- ------ ---- --- ------ --- BBEdit Lite has many of the same capabilities as the commercial BBEdit; however, the following capabilities of the commercial BBEdit are -not- present in BBEdit Lite: * BBEdit Lite cannot use the advanced HTML markup tools that are supplied with the full version; * BBEdit Lite does not include syntax coloring support; * BBEdit Lite does not support Internet Config for interacting directly with Internet service applications (such as Web browsers and FTP clients); * BBEdit Lite is not scriptable; * BBEdit Lite does not have an integrated FTP tool for accessing and editing files directly; * BBEdit Lite does not include an integrated spelling checker; * BBEdit Lite has only 1 level of Undo capability; * BBEdit Lite's use of Macintosh Drag and Drop is limited to dragging and dropping of text while editing. Commercial versions of BBEdit make more comprehensive use of drag-and-drop operations. * Find Differences (comparing files, folders, and projects) is not included; * QuickSearch (an incremental search facility) is not provided; * There is no option for split windows * Disk browsers are not available, and you can only have one Search Results window open at a time; * BBEdit's advanced PopupFuncs(TM) technology is not built in (you can, however, obtain and install PopupFuncs 2.8 or later into BBEdit Lite); * BBEdit Lite cannot open or browse project documents; * Integration with THINK C, Symantec C++, CodeWarrior, and THINK Reference is not supported; * ToolServer is not supported; * The Glossary function is not supported; * Marker support is not provided; * BBEdit Lite does not support Apple Guide for active assistance in using its capabilities. * XTND translation is not supported; In addition to the specific capabilities listed here, BBEdit 4.5 contains a large number of refinements and smaller capabilities that are not present in BBEdit Lite. About BBEdit 4.5 ----- ------ --- BBEdit 4.5 is an industrial-strength text editor for use by software developers, HTML authors, engineers, scientists, telecommunications users, and anyone else who needs to view, edit and manipulate plain-text documents with maximum flexibility and performance. BBEdit 4.5 is an ideal companion for CodeWarrior, THINK C, Symantec C++, THINK Pascal, MPW, and THINK Reference users. With BBEdit 4.5, you can: * Take advantage of integrated HTML editing tools and integration with Internet services to create and edit World Wide Web content; * See your code in color, with BBEdit's built-in syntax coloring for HTML, Java, Perl, C, C++, Pascal, and a whole bunch of other languages; * Quickly and easily edit files residing on remote FTP file servers, via "Open from FTP" and "Save to FTP" commands; * Use an integrated HTML-aware spell checker with a 100,000+ word dictionary to correct typographical and spelling errors; * Automate operations via AppleScript, Frontier, or any other OSA- compliant scripting system; * Easily compare text files, folders, and projects via a built-in differences engine and browser; * Use BBEdit 4.5 in conjunction with Metrowerks CodeWarrior (version 1.2 or later required) to compile source files, and run and debug projects; * Access multiple levels of Undo to speed your content editing tasks; * Use Macintosh Drag and Drop (included) for text editing and in various parts of the user interface; * Use integrated PopupFuncs(TM) technology to quickly navigate C, C++, Java, Pascal, Fortran, 68K assembler, Perl, HTML, Tcl, GuideScript, TeX, and ScriptX source files; * Browse and search source files in CodeWarrior, THINK C/Symantec C++, and THINK Pascal project documents; * Use BBEdit 4.5 in conjunction with Symantec C++ (version 6.0 or later required) to compile source files and run projects; * Use ToolServer to execute MPW Shell scripts for building MPW-based applications and other MPW-driven tasks, as well as MPW 411-based Toolbox searches; * Use THINK Reference 2.0, MPW 411, or Macintosh Programmer's Toolbox Assistant to search for Toolbox symbols and insert Toolbox call templates; * Open disk browser windows to easily navigate the directory structures of any mounted volumes and view files quickly and easily; * Take advantage of integrated Claris XTND translation to translate text files to and from popular word processor formats; * Use a glossary to store commonly-used pieces of text for insertion with a single keystroke; * Split editing windows for easier navigation and reference; * Enjoy many other technical advancements and refinements made since the original release of BBEdit. In addition, BBEdit 4.5 is delivered on CD-ROM with full printed and electronic documentation, a complete collection of BBEdit plug-ins contributed by BBEdit users from all over the world, demo versions of ours and other developers' products, and product information and special offers from select third-party developers. (Customers who don't have a CD-ROM drive can obtain floppy disks at a nominal extra cost.) Additional information on BBEdit 4.5's capabilities, and instructions on how to upgrade, are contained in the enclosed documents "What is BBEdit 4.5" and "How do I order BBEdit 4.5", or you can visit our Web site: for the latest information available. Distribution ============ BBEdit Lite is Freeware ------ ---- -- -------- BBEdit Lite is a freely distributable, copyrighted program, otherwise known as "freeware". There is no registration process, no fee requested or required, no obligation on your part, and no guilt. We at Bare Bones Software do not produce or develop "shareware"; it has been our direct experience that many people simply ignore shareware notices. The cost of goods related to distributing BBEdit Lite is very low, and can be recouped by means other than (unsuccessfully) trying to shame users into paying some small amount of money for a program. We believe that when users of a program make the financial sacrifice to obtain a piece of software, they should expect, and receive, significant value added. This is why a commercial distribution of BBEdit exists. If you feel compelled to pay us for BBEdit Lite, don't. If you need the capabilities that the commercial version of BBEdit has to offer, we encourage you to order your own copy of BBEdit. See "How do I order BBEdit 4.5" for information on how to do it. License Requirements ------- ------------ Although BBEdit Lite is free, it is not "public domain". It is a copyrighted software program, and Bare Bones Software, Inc. reserves all rights; therefore: * BBEdit Lite cannot be sold, either by itself or in combination with any other product, without the express written permission of Bare Bones Software, Inc. * If you are a user group which is publishing a CD-ROM or floppy collection, you may include BBEdit Lite and all of its related files without restriction, save that the entire original package is included. Contact Bare Bones Software for up-to-date versions and information. * If you are a hard disk vendor which distributes PD, shareware, and freeware on your disk drives, you are welcome to distribute BBEdit Lite. Contact Bare Bones Software for up-to-date versions and information. * Commercial publishers and distributors of CD-ROM software collections, to include any and all software compilations provided as an adjunct to printed or online publications, may not distribute BBEdit Lite on CD-ROM without the express written permission of Bare Bones Software, Inc. * BBEdit Lite may be posted on an information service which charges its users for general connection time and downloading, but it may NOT be posted to an information service which will charge for the specific right to download BBEdit Lite, without the express written permission of Bare Bones Software, Inc. * BBEdit Lite may be given away as a support utility for a package which is itself to be given away. People who need to distribute BBEdit Lite as a support utility should contact Bare Bones Software for up-to-date versions and information. Address all correspondence to: Postal: Bare Bones Software, Inc. P.O. Box 1048 Bedford, MA 01730 Web: email: -- licensing inquiries only -- all technical questions Phone: +1 781 687-0700 Fax: +1 781-687-0711 Please note that we cannot provide technical support for BBEdit Lite or our other freeware products via phone or fax. Getting Started with BBEdit Lite ======= ======= ==== ====== ==== Installation ------------ BBEdit Lite consists of the following major components: * The BBEdit Lite application itself * The "BBEdit Plug-ins" folder, which contains plug-in code modules that can provide specialized text processing or utility functions Only the BBEdit Lite application file is required in order to run and use BBEdit Lite; you do not need to have any plug-ins. If you are planning to install the whole set of BBEdit Lite files, create a "BBEdit Lite Folder". Then, copy the application and the "BBEdit Plug-ins" folder into your BBEdit Lite Folder. Creating and Saving Documents -------- --- ------ --------- To create a new document within BBEdit Lite, choose "New" from the File menu. An empty editing window will be opened on the screen. You can type in this window, paste text from another document or application, or do anything else which causes text to be placed in this window. Please note that in BBEdit Lite 4.1, the various "New" commands (which were previously hidden on the File menu) have been gathered into a single "New" submenu. However, your reflexes will still produce the expected results: Command-N still creates a new editing window, and you can still choose the first command from the File menu to create a new editing window. Once you have opened a new window and done some basic editing, you can save your new document. To do this, choose the "Save As..." command from the File menu. Type in the name of your new file and click on "Save". Editing Documents ------- --------- In terms of its basic editing functionality, BBEdit Lite behaves like any other word processor or text editor on the Macintosh: any typed characters are inserted at the insertion point; if there is a selection present, the selection is replaced by the first typed character, and the insertion point is placed after the first typed character. The insertion point is indicated by a blinking vertical bar. If there is any text selected in the active (or front) window, it is highlighted using your Mac's default highlight color. If there is text selected in a window that is inactive (not the front window), it is framed in the highlight color. As you type, BBEdit Lite scrolls the window's contents so that the insertion point is visible. Unless you have the "Soft Wrap Text" option selected, the window may scroll horizontally as you type. To move text from one place to another, select the text you wish to move, and choose the "Cut" command from the Edit menu. The selected text will be deleted, and placed in a special area called the "Clipboard". (The Clipboard always contains the last text that you cut or copied.) You can then use the "Paste" command on the Edit menu to place the text elsewhere in the document you are editing, or even in another window altogether. Also, any text that you cut or copy can be pasted into another application. You can place text in the Clipboard without deleting it by choosing "Copy" from the Edit menu. When you Paste, the text that's in the Clipboard will replace the current selection (if there is one), or be inserted at the insertion point. Paste doesn't remove text from the Clipboard, so you can Paste as many times as you wish. To delete selected text, hit the "Delete" key on your keyboard, or choose "Clear" from the Edit menu. If you have a keyboard with a numeric keypad on it, you can hit the "Clear" key on the keypad to delete the selected text. To select all the text in the front editing window, choose "Select All" from the Edit menu. You can then cut, copy, or perform any other action that affects selected text. BBEdit Lite provides an assortment of facilities for transforming text in various ways. The commands to transform text are all found under the Text menu: Balance locates the pair of parentheses, braces, or brackets which encloses the current selection range or insertion point. If there are unmatched parentheses, braces, or brackets, BBEdit Lite will beep. Twiddle transposes the two characters on either side of the insertion point, or at either end of the selected text. Change Case... allows you to automatically switch between upper and lower case characters for entire words, first letters of words, or first letters of lines. Shift Right and Shift Left will indent the selected text by one tab stop (in the case of Shift Right), or outdent by one tab stop (for Shift Left). If you hold down the Shift key while choosing one of these commands, the selected text will be indented or outdented by one space instead of one tab stop. The Hard Wrap... command is used for wrapping long lines of text and filling paragraphs. Essentially, it uses carriage returns to break lines of text, to keep them from running off to the right of your screen. Insert Line Breaks "freezes" the line breaks in soft-wrapped documents, by turning each soft line break into a hard carriage return. This is useful when preparing to transmit a soft-wrapped document to an environment that doesn't support soft wrapping. Remove Line Breaks removes carriage returns and spaces between groups of text. Essentially, it performs the reverse function of the "Hard Wrap..." command. Zap Gremlins... is useful for finding and altering non-printing characters in your text files. Entab converts runs of spaces into tabs, according to the current setting in the "Font and Tabs..." dialog. This transformation is useful when downloading text from a mainframe computer or on-line service which uses spaces to line up columns of text; when displaying the text in a monospaced font, columns will still usually not line up unless you Entab the text. Detab converts tabs into runs of spaces, according to the current setting in the "Font and Tabs..." dialog. This is useful when uploading text to a mainframe or on-line service which has no concept of tabs as column separators. Cursor Key Equivalents Sometimes, you may want to perform word selection or deletions directly from the keyboard. Here are some available shortcuts: Key Modifier Action === ======== ====== (left/right) Arrow (none) Move 1 character left/right (left/right) Arrow Option Move 1 word left/right (left/right) Arrow Command Move to beginning/end of line (up/down) Arrow (none) Move up/down 1 line in file (up/down) Arrow Command Move to top/bottom of file (up/down) Arrow Option Move to previous/next screen page [any of the above] Shift Make or extend a selection range Delete (none) Deletes selection range, or character preceding the insertion point. Delete (Command) Deletes all characters backwards to beginning of line Delete (Option) Deletes all characters back to beginning of word There is an option to "Exchange Command & Option" key effects in the Editor section of the Preferences, for those who may be used to some older environments which behaved this way. If this option is activated, the behavior of the Up and Down arrow key equivalents will change accordingly. Menu Item Modifiers ---- ---- --------- Here is a listing of some of the additional functions (or changes to the behavior of existing functions) which can be invoked by using various modifier keys. Please remember that BBEdit Lite displays the modified names of these commands in its menus, so to see the commands in context, just pull down the menu and press one or more modifier keys. Menu Item Modifier New Name Action ==== ==== ======== === ==== ====== File Open Selection Option Reveal Selection Displays the selected file in the Finder Close Option Close All Closes all open documents Save Option Save All Saves all unsaved documents Save As.. Option Save As Selection.. Uses selection as default name for Save As Print.. Option Print All.. Prints all open documents Quit.. Option Transfer.. Run another application Edit Cut Shift Cut & Append Cut & Add to Clipboard Copy Shift Copy & Append Add to Clipboard Select Line Option Select Paragraph Selects paragraph containing current line Text Twiddle Option Twiddle Words Exchange words Change Case.. Option Change Case Use current settings Shift Left Shift Shift Left One Space Shift Right Shift Shift Right One Space Wrap.. Option Wrap Wrap with current settings Unwrap.. Option Unwrap Unwrap with current settings Zap "Gremlins"..Option Zap "Gremlins" Zap with current settings Entab.. Option Entab Use current settings Detab.. Option Detab Use current settings Search Enter Option Enter Search String Replace String Find in Option Open All Matches Find in Next File Next File until no more found Go to Line... Option Go to Line Use last setting Windows Arrange... Option Arrange Use last setting Special Keys ------- ---- The Apple Extended Keyboard has additional function keys on it, which are usable within BBEdit Lite: Key Action === ====== F1 Undo F2 Cut F3 Copy F4 Paste "del" Forward Delete Home/End Scroll to start/end of document Cmd-Home/End Move insertion point to start/end of document Page Up/Down Scroll up/down a page Printing -------- BBEdit Lite offers a variety of options for varying your printed output. These options are available from the dialog that appears when you choose "Print" from the File menu. If you are using recent versions of the LaserWriter driver, select the "BBEdit Lite 4.1" item from the popup menu to access these options. If you are using an older version of the LaserWriter drivers, or other printer drivers, the portion of the dialog above the gray line is the normal set of controls that is provided by whichever printer driver you use. Below the gray line are controls provided specifically by BBEdit Lite. * The "Printing Font:" button will bring up a dialog that allows you to set the font, size, style, and tab attributes for the text when it's printed (as opposed to when it's displayed). For a description of the controls in this dialog, see the "Editing" section of this document. * The "Options..." button will present a dialog box for setting various formatting options, most of which should be self-explanatory. Most of the options in "Options..." dialog only affect the appearance of the pages that are printed out, and can therefore be set according to your individual taste. Setting Your Preferences ------- ---- ----------- To bring up the Preferences dialog, choose "Preferences..." from the Edit menu, or double-click on your BBEdit Lite Prefs file. (This may not be convenient, since the BBEdit Lite Prefs file usually resides somewhere within the System Folder.) The list on the left-hand side of the dialog determines which section of the preferences you are looking at. If you click on "Save", all of the preferences settings will be saved to the "BBEdit Lite Prefs" file. If you click on "Cancel", the existing preferences will be left alone, and any changes you've made in the Preferences settings will be discarded. The Editor preferences control BBEdit Lite's editing and keyboard behavior. These settings establish the defaults for newly-created documents, as well as for text files that don't already contain BBEdit Lite state information. * The "Default Font" button sets the font which will be used to display the text in newly created windows, and for documents which have no saved state information. * If "Auto-Indent" is turned on, BBEdit Lite will indent to the start of the preceding line whenever you type the "Return" key on the keyboard. This is useful for programmers and for reverse-indenting text. It may be less convenient if you are using BBEdit Lite for composing prose. * Soft Wrap Text: by default, BBEdit Lite does not automatically wrap text as you type it in, which means the text may scroll horizontally. Selecting this option tells BBEdit Lite to wrap the text as you enter, insert, or delete it, using the "Wrap To:" width that you choose. * If Balance While Typing is turned on, BBEdit Lite will flash matching parentheses, curly braces, and brackets as you type them. * Smart Quotes is used to determine the default value of the Smart Quotes setting for newly created windows and for documents saved with state information other than "BBEdit". If this option is on, BBEdit Lite will automatically insert curly, or typographers, quotes instead of the normal straight marks. (If you are editing material for online distribution, or platforms other than Mac, it is best to leave this off!) * Ordinarily, actions such as using BBEdit plug-ins are not undoable, and BBEdit Lite will alert you if you are about to perform a non-undoable action. If you are not concerned about being able to undo these actions, and do not want BBEdit Lite to alert you, turn on the "No 'Can't Undo' Alerts" check box. * Exchange Command and Option reverses the meaning of the Command and Option keys when used with the Up and Down arrow keys. See "Editing Text with BBEdit Lite" for more details. * If Use Keypad for Cursor Control is checked, the keys on the numeric keypad (on keyboards that have them) will move the cursor. See "Editing Text With BBEdit Lite" for more details. The File Search section of the Preferences controls BBEdit Lite's behavior when searching for files via the "Open Selection" command. * If "Skip (...) Folders" is checked, BBEdit Lite will ignore folders whose names are enclosed in parentheses. * The "Default <...> Directory" setting determines which directory BBEdit Lite will start a multi-file search in by default (if you do not select another folder from the Find dialog). * If "Follow Aliases" is checked, BBEdit Lite will resolve any folder aliases it encounters during its search. The File Types section of the Preferences allows you to modify the list of file creators that appears in the "File Creator" popup menu of the "Save As..., Options..." dialog box. To add a new application's file creator to the list, click the "Add..." button, and choose the application. To change an application's creator signature, click on an application name in the list, enter a new four-letter code in the text field next to "Creator...", and click the "Change" button. You can use the "Set button to pick an application and enter its creator code in the text field for you. To remove an application creator from the list, click on an application name, and click the "Delete" button. The creators for "BBEdit Lite" and "Generic Text File" are built into BBEdit Lite and cannot be changed or deleted. The Filing settings control the default settings for the Open... and Open Several... dialogs. * If "Wrap TeachText Files" is checked, then BBEdit Lite will always soft- wrap files which have been created by TeachText (or its successor SimpleText). * If "Auto-Backup" is checked, a backup will automatically be made of a file every time it is saved. The Grep Patterns section of the Preferences dialog allows you to modify the list of regular expressions which appears in the popup menu next to the "Grep" check box in the "Find..." dialog. The scrolling list box shows the names of the installed patterns. When you click on one, the text fields below the list will be filled in with its name, search pattern, and replace pattern. You can change any of these text fields, and click "Change" to replace the selected pattern with the changed one. You can also enter new information in the text fields and click "Add" to add a new pattern, or select a pattern and click "Delete" to remove it from the list. For more information on grep patterns, please see the next section on Searching. Note: You can install a pattern with an empty replace pattern, which is useful just for locating text which matches a particular regular expression. The Printing settings provide the default print settings for new windows and for documents which have saved state information other than BBEdit Lite's. These settings correspond to the same settings on the "Options..." dialog which can be brought up from the Print... dialog. The Search Folders section presents a list of folders which will appear in the "Folder:" pop-up menu in the "Find" dialog. The Startup settings determine BBEdit Lite's behavior when it is launched without any documents. * The "At Startup:" radio buttons control what BBEdit Lite does when it's launched by some means other than double-clicking on a BBEdit Lite document, or by dragging and dropping some item onto BBEdit Lite itself (under System 7). * If "Nothing" is selected, BBEdit Lite will take no action at startup. This is handy if BBEdit Lite regularly gets launched into the background, or is launched by some external utility which will then start sending commands to BBEdit Lite directly. * New Window causes BBEdit Lite to bring up a new untitled window, as if the "New command on the File menu had been chosen. * Open causes BBEdit Lite to bring up an "Open..." dialog, as if the "Open..." command on the File menu had been chosen. * Open Several causes BBEdit Lite to bring up the "Open Several..." dialog, as if that command had been chosen. The State settings control what parts of a file's saved state are honored whenever a file with saved state information is opened. In some cases, it may be desirable to ignore one of these aspects of the saved state. * The "Remember File State" setting establishes whether BBEdit Lite will remember information about the document's state (window position, font and size settings, and other options). This default is applied to newly created documents. If "Always Add State" is checked, BBEdit Lite will remember state information for documents that you open which don't already have saved state information. The Text Search settings provide the defaults for text searching and multi-file searching. The options in this dialog correspond to their counterparts in the Find... and the Multi-File Search Options dialog. The Windows settings affect the appearance and behavior of BBEdit Lite's document windows. * Delay When Scrolling makes BBEdit Lite wait a tenth of a second when you click in the arrows of a scrollbar before scrolling the text in a document window. * Show Status Bar causes the status bar to be visible within all editing windows. (See "Editing Text With BBEdit Lite" for a description of the status bar.) This option is on by default; you can turn it off if you have a small screen and screen "real estate" is at a premium. * Show Philip Bar draws a vertical gray line in the status bar at the point where the visible editing area ends on a 9-inch "classic" screen. * Show Tab Stops places tick marks in the status bar to indicate the position of tab stops in each editing window. This option is dimmed if "Show Status Bar" is turned off. * Show Line Numbers places line numbers along the left edge of each editing window. * Show Cursor Position places the cursor-position display at the lower left corner of each editing window; this display shows the position of the insertion point, or the last-changed end of the selection range. * Window Zooming controls the maximum width to which BBEdit Lite will open documents, either by default or when using the zoom-box control in the upper right-hand corner of the window; the "Zoom Windows To" setting determines where BBEdit Lite will place windows that are zoomed on multiple-screen systems. * If either of the check boxes under the "Leave Room for Finder" is checked, BBEdit Lite will make certain that there's enough space below and/or to the right of any window so that icons on the desktop are not obscured by the edges of the Window. Note: If you are running on a Macintosh with a 9-inch screen, the window sizes when either of these options is checked are usually too small to be useful. Therefore, you may want to turn these options off if you have a small screen. Text Wrapping ---- -------- BBEdit Lite offers the capability to wrap text in a variety of ways. One method of wrapping is the "soft" or "live" word wrapping that word-processors provide; it is useful when importing text files from word processors or other programs that do not use carriage returns to break lines on the screen. When opened, such files appear to have only a few lines in them, which run far past the right-hand edge of the window. Soft text wrapping is also useful when you are writing text that will be exported to a word processor or page-layout program, as well as in other situations in which paragraphs are separated by carriage returns. For composing text in situations where carriage returns are a line separator (rather than a paragraph separator), "hard" text wrapping is useful for formatting your text. To hard-wrap text in the current document window, choose "Hard Wrap..." from the Text menu. The controls on the left half of the "Hard Wrap..." dialog box control how much of the text is wrapped, and the maximum length of the lines after wrapping. The group of radio buttons controls the length of lines after they have been wrapped: * The "Philip Bar" button will break lines of text at the philip bar. (To see the location of the philip bar, turn on "Show Philip Bar" in the Windows section of the Preferences dialog.) The philip bar indicates the maximum usable width of a document window when the window is zoomed to full size on a nine-inch "classic" Macintosh screen. For this reason, you are guaranteed that text wrapped to the philip bar will be readable without horizontal scrolling by anyone on any Macintosh. * If "Window Width" is selected, no wrapped line will be longer than the current width of the window. This option is useful if you'd like the lines to be a little longer or a little shorter than is provided for by the philip bar; just size the window appropriately and wrap. * If "Character Width" is selected, the number in the text field designates the maximum number of characters allowed on any line; a line that exceeds this number of characters in length will be wrapped. The "Character Width" setting is useful for preparing postings to on-line services, which can break lines in an unattractive fashion if they're longer than a fixed number of characters (usually 80). The controls on the right half of the dialog control paragraph wrapping. If the "Paragraph Fill" check box is turned off, long lines will be wrapped, but short lines will be left untouched. If "Paragraph Fill" is on, the entire contents of the selection range will be rewrapped using the current width option; no existing line breaks will be preserved. Searching ========= String Searches ------ -------- BBEdit Lite gives you the ability to search for strings of characters within the current document, or within multiple files, whether they're currently open in BBEdit Lite or not. When you choose "Find..." from the Search menu, BBEdit Lite will present a dialog box with several options. The edit field directly below "Search For:" contains the string of characters that you wish to search for. If the "Grep" check box is checked, the string in this edit field is a regular expression. See below for more information on grep searching. The edit field directly below "Replace With:" contains the string of characters that will replace the current selection whenever you choose "Replace", "Replace and Find Again", or "Replace All" from the Search menu. Note: To search for a carriage return, line feed, or tab character, you can either 1) type the literal character by holding down the Command key and hitting the Return or Tab key, or 2) enter the expression "\n" for a line feed, "\r" for a carriage return, or "\t" for a tab. To search for a -literal- occurrence of an backslash character "\" (for example, in C or Rez program source), use two backslashes: "\\n", "\\r", and "\\t". Also, a "\\" will be interpreted to mean a single backslash (just as it does in C). The "Match Case" check box determines whether the search is case-sensitive or not. If "Match Case" is checked, only text which has the same combination of upper and lower case letters as the Search For string will be found. The "Entire Word" check box determines whether the text being searched must be bounded by word breaks (spaces, dashes, and other punctuation). The "Start at Top" check box will cause the entire document to be searched, starting at the beginning of the document and proceeding forward to the end of the document. The "Wrap Around" check box will cause the entire document to be searched, regardless of where the current insertion point or selection range lies. Ordinarily, only the text from the start of the selection range to the end of the document is searched. If "Wrap Around" is turned on, and the search string isn't found between the start of the selection range and the end of the document, the search will automatically restart from the beginning of the document. If the search string is found in the document after wrapping around, BBEdit Lite will blink the menu bar to alert you. If the "Search Backwards" check box is checked, BBEdit Lite will search backwards from the start of the insertion point to the start of the document, rather than forward to the end of the document. If "Wrap Around" is checked, and the search string is not found between the start of the document and the start of the selection range, the backwards search will resume from the end of the document. If the "Selection Only" check box is checked, BBEdit Lite will search only the selected range of text. Note: If "Start at Top" is checked, the "Search Backwards", "Selection Only", and "Wrap Around" options are automatically disabled. After you have entered the search and replace strings and set the search options appropriately, you can click any of the buttons arrayed along the right-hand edge of the dialog: * If you click "Find", BBEdit Lite will search for the current search string, using the current search options. * If you click "Find All", BBEdit Lite will locate all occurrences of the search string, using the current search options, and display those occurrences in a "Search Results" window. * If you click "Replace", BBEdit Lite will search for the next occurrence of the search string, using the current search options, and replace it with the specified replace string. * If you click "Replace All", BBEdit Lite will locate all occurrences of the search string, and replace them with the specified replace string. * If you click "Don't Find", BBEdit Lite will accept the current search strings and options, but will not perform the search; you can then choose "Find Again" from the Search menu to start the search. Note: If the "Multi-File Search" box is checked, the "Find All" and "Replace All" buttons will operate across all files that BBEdit Lite locates using the indicated search method and starting point. Multi-File Searching ---------- --------- BBEdit Lite also provides a variety of means for searching through multiple text files at one time in order to locate the search string. To perform a multi-file search, check the "Multi-File Search" check box in the Find... dialog. The popup menu next to "What:" determines how BBEdit Lite will locate the files to be searched. There are three ways to locate files: * Folder Search. When this search method is chosen, BBEdit Lite scans through the folders starting at the one you choose, and each file that it encounters will be searched for the search string. * Open Windows. When you choose this search method, BBEdit Lite searches for the search string only in document windows that are currently open. This sort of search is very fast, and may be most convenient if you wish to limit the scope of your search to a few files. * Search Results. This search method is only available when the "Search Results" window is open and contains the results of a previous Batch Find (see below). The check boxes can be used to tailor the search to your needs: * Batch Find accumulates the results of the search in progress and displays them all at once in a Search Results window. If this check box is not checked, then the multi-file search will stop each time it encounters a match, and open the file that contains the match. Once the Search Results window is opened, you can single-click on an entry in the window to display any given match, or double-click on an entry to open the file containing that match. * Search Nested Folders causes the Folder Scan search to search folders which are enclosed in the search's starting directory. If this check box is turned off, only the files in the starting directory will be searched. * Skip (...) Folders causes the Folder Scan to skip folders whose names are enclosed in parentheses. This is useful if you have folders containing text files that you do not want to search for one reason or another; just enclose the folders' names in parentheses, and they will be skipped. The "File Type" and "File Name" pop-up menus give you control over the types of files that BBEdit Lite will search. Choose "Any File" from the menu to search files of all kinds, regardless of whether they contain actual text or not. Choose "Text Files" to limit the search to known text files. When BBEdit Lite performs a multi-file search, it does so in two steps. First, it constructs a list of the files to be searched, using the search method specified in the Multi-File Search Options dialog. Second, it searches each file in the list for the search string. If "Batch Find" is selected, all occurrences in each file will be displayed in the Search Results window. Otherwise, each file will be opened to display the first occurrence of the search string; you can find subsequent occurrences of the search string in the same file by choosing "Find Again" from the Search menu. If you are not using Batch Find, you can locate the next file that contains the search string by choosing "Find In Next File" from the Search menu. You can combine the capabilities of BBEdit Lite's multi-file search with the Replace All command to perform multi-file replace operations. To do this, set up a multi-file search as desired, and click the "Replace All" button in the Find dialog. Once BBEdit Lite has constructed the list of files to search, it will present a dialog containing options for the replace operation: There are three levels of safety that are available: * Safest. Click on the "Leave Open" radio button. For each file that contains the search string, BBEdit Lite will perform a "Replace All" on that file, and leave the file open so that you can inspect the changes. * Less Safe. Click on the "Save To Disk" radio button, and make sure that the "Confirm Saves" check box is checked. BBEdit Lite will perform a Replace All on each file that contains the search string, and then ask you what to do. If you click "Save", BBEdit Lite will save the changed file. If you click "Don't Save", BBEdit Lite will throw away the changes that were just performed. If you click "Leave Open", BBEdit Lite will leave the file open; this is the same behavior as the "Safest" case, above. If you click "Cancel Search", BBEdit Lite will stop the multi-file replace operation. * Living on the Edge. Click on the "Save to Disk" radio button, and un-check the "Confirm Saves" check box. If you do this, BBEdit Lite will perform a Replace All on each file that contains the search string, and then save the changed file to disk without asking. You should only use these settings if you are absolutely certain of what you are doing, since the changes are irreversible. Grep Searching ---- --------- Grep is a method of pattern matching that derives from utilities commonly provided with the Unix(TM) operating system. You are probably familiar with simple pattern matching from using word processors; when you ask a word processor to find all instances of the word "black", it is performing a simple pattern match, where each letter has to match literally. Matching strings in this manner is not very hard. The ability to match strings in a more general manner is both more powerful and more complicated. It allows for sophisticated pattern matching operations, such as matching all words that begin with the letter "P" and end with the letters "er", or deleting the first word of every line. Grep provides a powerful means of doing this. To use grep patterns for searching documents, just check the "Grep" check box in the Find... dialog. The popup menu next to the "Patterns:" in the dialog contains a list of your most commonly-used grep patterns. You can change this list in the "Grep Patterns" section of the Preferences... dialog. How Grep Works The "grep" mode of searching and replacing is a powerful tool. Although somewhat slower than normal text searching, grep allows the user to search for one of a set of many strings instead of a particular string. As a simple example, you can search for any occurrence of an identifier beginning with the letter P, or all lines that begin with a left brace. A pattern is a string of characters that, in turn, describes a set of strings of characters. An example of a set of strings is the set of all strings that begin with the letter P and end with the letter r; the strings "Ptr" and "ProcPtr" are members of this set. We say that a string is matched by a pattern if it is a member of the set described by the pattern. Patterns are composed of sub- patterns which are patterns in themselves; this is how complicated patterns may be formed. Rules for Creating Grep Patterns The following section goes through the grep pattern matching and replacement rules step by step, so that by the end of it you should be able to understand how each of these grep patterns works and be able to make your own. In some cases, the state of case sensitivity affects the results of a pattern match. We have noted below when this is the case. 1. Any character, with certain exceptions described below, is a pattern that matches itself. 2. A pattern x followed by a pattern y forms a pattern xy that matches any string Bu where B can be matched by x and u can be matched by y. We can, of course, take the compound pattern xy and concatenate yet another pattern z onto it, forming the pattern xyz. 3. The character . is a pattern that will match any character. 4. The character # is a pattern that will match any single numeric digit. 5. The character \ followed by any single character is a pattern which matches the literal single character. (You would use this to find special characters, such as the . or # characters. To search for a period, you would use \.). 6. A string of characters s surrounded by square brackets ([ and a ]) forms a pattern [s] that matches a single instance of one of the characters in the string s. 6a. The pattern [^B] matches any character that is not in the string B. Special characters will be taken literally in this context. 6b. If a string of three characters in the form [a-b] occurs in the pattern p, this represents all of the characters from a to b inclusive. All special characters are taken literally; i.e., [!-.] denotes the characters from ! to .. Notice that the only way to include the character ] in p is to make it the very first character. Likewise, the only way to include the character - in p is to have it either at the very beginning or the very end of p. Single characters and ranges may both be used between brackets. 7a. Any pattern p formed by any combination of rules 1 or 3-6b followed by a * forms the pattern p* that matches zero or more consecutive occurrences of characters matched by p. 7b. Any pattern p formed by any combination of rules 1 or 3-6b followed by a ? forms the pattern p? that matches zero or one consecutive occurrences of characters matched by p. 7c. Any pattern p formed by any combination of rules 1 or 3-6b followed by a + forms the pattern p+ that matches one or more consecutive occurrences of characters matched by p. 8. The character | placed between two patterns p1 and p2 specifies that either one or the other of these patterns (but not both) matches the target string. We now have the ability to form patterns that are composed of sub-patterns, and will find it useful to "remember" sub-strings matched by sub-patterns and to be able to match against those substrings. 9. A pattern surrounded by ( and ) is a pattern that matches whatever the sub-pattern matches. This is useful when doing replacements. Sometimes it is useful to be able to "constrain" patterns to match only if certain conditions in the context outside the string matched are met. 10. A pattern p that is preceded by a ^ forms a pattern ^p. If the pattern ^p is not preceded by any other pattern, it matches whatever p matches as long as the first character matched by p occurs at the beginning of a line. If the pattern ^p is preceded by another pattern, then the ^ is taken literally. 11. A pattern p that is followed by a $ forms a pattern p$. If the pattern p$ is not followed by any other pattern, it matches whatever p matches as long as the last character matched by p occurs at the end of a line. If the pattern p$ is followed by another pattern, then the $ is taken literally. Note that the characters ^ and $ constrain pattern matches to begin or end at line boundaries, and so can be combined to constrain a pattern to match an entire line only. Grep provides not only a more sophisticated method of searching, but a sophisticated method of replacing as well. In a replacement string, the following substitutions are made before any text replacement occurs: 1. Each occurrence of the character & is replaced with whatever was last matched by the entire pattern. 2. Each occurrence of a string of the form \n, where n is one of the digits 1-9, is replaced by whatever was last matched by the sub-pattern beginning with the nth occurrence of (. 3. Each occurrence of a string of the form \p, where p is other than one of the digits 1-9, is replaced by p. This allows you to not only be able to search for a string satisfying a complex set of conditions, but also to be able to do a subsequent replacement that varies depending on the string that is matched. Note that this does not take into account escape sequences, such as \t, \r, \n, \\, etc. Suppose that you are writing a Macintosh application (i.e., it uses the Macintosh ToolBox instead of stdio for the user interface). Suppose also that you have discovered that you have forgotten to put a \p at the beginning of your string constants, so that your program is trying to pass C strings instead of Pascal strings to the Toolbox (which only knows how to deal with Pascal strings). You can easily change all your C strings to Pascal strings by specifying "(.*)" as the search pattern and "\\p\1" as the replacement string. A Simple Example Suppose you decided to reverse the two arguments of the function "foo". You might try the pattern foo\(([^,]*),([^)]*)\) as the search pattern and foo(\2, \1) as the replacement pattern. How does the search pattern work? Let's assume we're trying to match some text that looks like foo(1,*bar) foo\(([^,]*),([^)]*)\) matches foo(1,*bar) Since ([^,]*) matched 1 and ([^)]*) matched *bar, the two arguments to foo, the replacement pattern foo(\2, \1) will result in foo(*bar, 1) This, unfortunately, won't work in the case of foo(1,(*bar)+2), since ([^)]*) will match only up to the first right parenthesis, leaving +2) unmatched. If we're sure that all calls to foo end with a semicolon, however, we can change our pattern to foo\(([^,]*),([^;]*)\);. In this pattern, instead of trying to match the second argument by matching everything up to the first right parenthesis, we match everything up to the ); which terminates the invocation of foo. In this example we showed how to analyze a grep pattern by examining sub- patterns. This is a good way of figuring out how to build a pattern as well. Grep can be thought of as a small and rather cryptic programming language, with each pattern a program and sub-pattern a statement in this language. If you try to create a grep pattern by testing a small sub-pattern, then adding and testing additional sub-patterns until the complete pattern is built, you may find building complex grep patterns not nearly as daunting as you first thought. An HTML Example Using grep, we want to change the following tag instance:

changeable text

into something that looks like:

changeable text

In other words, we want to modify some of the tags, but keep the text content the same. Here is one way to approach the issue: search for:

([^<]*)

replace with:

\1

(please pay special attention to the parts in bold type during the following discussion) An important thing to keep in mind when constructing grep patterns is that you do not have to abstract everything out; it is OK to use big chunks of strings as part of the search pattern! In this case, we use strings to specify the exact tag format we want to match, and use a character range for the variable text. However, before proceeding further, we must see whether these strings contain any special grep characters, and if they do, we must modify them accordingly. In particular, one of the target tags contains a color value #0000FF, and as we learned above, the number sign # is a special character meaning 'match any digit' in grep. So, we must _escape_ this in the pattern by placing a backslash ahead of it \# so that it will be interpreted literally instead. (This is not necessary in the replace string, since that is not performing a match on anything, but it would work properly there as well.) The range is then constructed as follows: having matched the opening font tag by means of a string, we now want to pick up all text from here to the next tag. So, we search for anything _except_ another left angle bracket [^<] where the range is denoted by the square brackets, ^ means "not the following character", and < is of course what would begin the next tag. The * added to the range means "find zero or more instances of the preceding item" (so we can match empty tags as well), and the whole thing is then enclosed in parentheses ([^<]*) to let us reference this _subpattern_ in the replace string. Thus, the replace string is just the revised tag form, with a \1 to insert the contents of the first (and only) subpattern match defined in the search expression at that point. A couple of things to keep in mind: this search pattern will not work if the 'changeable text' section contains markup, since we are specifically keying on the presence of a tag opening character. You can avoid this by using the simpler expression: search for:

(.*)

but this has the disadvantage of not suppressing BBEdit's _longest match_ behavior, so any match will extend to the close of the furthest font tag possible (e.g. if there are two font tags per line in your source document). If all these tags live on single lines, and you have markup contained in the changeable text, this is OK; if the tags span lines, you are better off with the preceding expression. Parting Shots ======= ===== Technical Support --------- ------- Should you have questions about BBEdit Lite, please send us e-mail: Please note that we cannot provide support for BBEdit Lite or our other freeware products via phone or fax. From time to time, we will release updates to correct problems in the software, and/or add minor functionality. Updates to our freeware may be found on the Freeware page on our Web site, as well as in the Freeware directory on our public FTP area: We will also provide technical support bulletins, as warranted by circumstances, to address some commonly encountered problems. You can also find a list of frequently asked questions about BBEdit on our Web page. If you do have a problem with the software, please let us know. All too often, users do not report problems for one reason or another. Remember that if we do not hear about a problem, we can't fix it. Copyrights ---------- All products mentioned are trademarks or registered trademarks of their respective holders. This document is written by and copyright (c)1995-1998 by Bare Bones Software, Inc. It may be redistributed freely as long as it is not modified in any way. Information presented here is accurate as of the time of writing, but is subject to change without notice. BBEdit Lite is copyright (c)1992-1998 Bare Bones Software, Inc., all rights reserved. Please see the preceding section of this document for license requirements. Limited warranty and limitation of remedies ------- -------- --- ---------- -- -------- The program and any support from Bare Bones Software, Inc., are provided "as is" and without warranty, express and implied, including but not limited to any implied warranties of merchantability and fitness for a particular purpose. In no event will Bare Bones Software, Inc. be liable for any damages, including lost profits, lost savings, or other incidental or consequential damages, even if Bare Bones Software, Inc. is advised of the possibility of such damages, or for any claim by you or any third party. Additional Acknowledgements ---------- ---------------- The regular-expression library used for 'grep' searching is based on the 'regexp' package, written by Henry Spencer of the University of Toronto. Pete Keleher provided a Mac- compatible version, from which BBEdit's code is derived. Thanks! ======= Thank you for using BBEdit Lite! If you have any suggestions for improvements, or any problems to report, please do not be shy. Our experience shows that feedback from our customers has consistently led to better products and happier users. -- The Bare Bones Software Team =end=